//
//  MKMapView.m
//  singForYou
//
//  Created by nicolas on 2017/3/8.
//  Copyright © 2017年 nicolas. All rights reserved.
//

#import "MKMapView.h"
#import "MKGrayBarView.h"
#import "Masonry.h"

@interface MKMapView ()

@property (nonatomic, strong) MKGrayBarView *grayBarView;

@end
@implementation MKMapView

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        [self addSubview:self.grayBarView];
    }
    
    return self;
    
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    [self.grayBarView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self);
        make.top.equalTo(self);
        make.width.mas_equalTo(self.frame.size.width);
        make.height.mas_equalTo(44);
    }];
    
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    
    
    
}

#pragma mark - 懒加载
- (MKGrayBarView *)grayBarView {
    
    if (!_grayBarView) {
        
        _grayBarView = [[MKGrayBarView alloc] init];
        
    }
    return _grayBarView;
}
@end
